//
//  BusinessDetailTableViewCell.swift
//  ZNZXSuperMarket
//
//  Created by 四川中农 on 2018/8/21.
//  Copyright © 2018年 四川中农. All rights reserved.
//

import UIKit

class BusinessDetailTableViewCell: UITableViewCell {

    @IBOutlet weak var headerImgV: UIImageView!
    @IBOutlet weak var name: UILabel!
    @IBOutlet weak var principal: UILabel!
    @IBOutlet weak var addressLabel: UILabel!
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        self.headerImgV.setCornerRadio(radio: 30, isMask: true)
        self.headerImgV.setBorder(color: "000000", width: 1)
        self.headerImgV.my_setImage(url: Utils.getUserDefaulsFor(key: "storeImg") as! String, placeholder: Api.placeHolder.rawValue)
        self.name.text = (Utils.getUserDefaulsFor(key: "storeName") as! String)
        var phone = ""
        if UserDefaults.standard.object(forKey: "phone") == nil {
            phone = UserDefaults.standard.object(forKey: "userPhone") as! String
        }else{
            phone = (Utils.getUserDefaulsFor(key: "phone") as! String)
        }
        self.principal.text = Utils.getUserDefaulsFor(key: "name") as! String + "    " + phone
        self.addressLabel.text = (Utils.getUserDefaulsFor(key: "address") as! String)
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
